<?php
namespace app\common\validate;
use think\Validate;
class AuthUserInfoValidate extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name'  => 'require',
        'identity_card'  => ['require','regex' => '/(^\d(15)$)|((^\d{18}$))|(^\d{17}(\d|X|x)$)/'],
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'name.require' => '姓名必填',
        'identity_card.require' => '身份证号必填',
        'identity_card.regex' => '身份证号格式错误',
    ];
}